//q4.cpp
//This program takes a number and checks whether it's digits are going down.
//
//Binyamin 4 Jan 2018
//====================================================================================

#include<iostream>

using namespace std;

//is_down
//intput: a number
//output: whether the number goes down.
bool is_down(int a)
{
	if((a<100)&&(a>9)) return a%10>a/10;
	return is_down(a%100) && is_down(a/10);
}

//1. prompt for a number.
//2. capture the number.
//3. return whether the number goes down.
int main()
{
	int num; //num - user input.
	cout << "Please enter a number ";
	cin >> num;
	if(is_down) cout << "The number does go down" << endl;
	else cout << "The number doesn't go down" << endl;
}
//output
//Please enter a number 12345
//The number does go down
